﻿<%@ Control Language="C#" %>
<script runat="server">
    
    private int Item_typ = 1;
    private int cid = 0;
    private int lang = 1;
    private int root_id = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Item_Typ==1)
        Item_Typ = Utils.GetQueryString("menu_typ", 1);
        if (Cid==0)
        Cid = Utils.GetQueryString("cid", 0);
        Item_Lang = Utils.GetQueryString("lang", 1);
        Menubar menus = new Menubar();
        Repeater_List.DataSource = menus.List(Item_Typ, Item_Lang, Cid, Root_ID);
        Repeater_List.DataBind();
    }

    public int Item_Lang
    {
        get { return lang; }
        set { lang = value; }
    }
    public int Item_Typ
    {
        get { return Item_typ; }
        set { Item_typ = value; }
    }
    public int Cid
    {
        get { return cid; }
        set { cid = value; }
    }
    public int Root_ID
    {
        get { return root_id; }
        set { root_id = value; }
    }
</script>


<asp:Repeater runat="server" ID="Repeater_List">
<ItemTemplate>
<tr id="TR<%#Eval("Item_Id") %>" class="child_tr">
    <td></td>
    <td class="childtd child_position"><%#Eval("Item_Name")%></td>
    <td><code class="block"><%#Eval("Item_Url")%></code></td>
    <td><code><%#Eval("Orders")%></code></td>
    <td><img src="../static/img/p<%#Eval("Item_Position")%>.png" /></td>
    <td><p><%#Eval("Item_Introduction")%></p></td>
    <td><time title="<%#Eval("Create_Time","{0:yyyy/MM/dd HH:mm:ss}")%>"><%#Eval("Create_Time","{0:yyyy/MM/dd}")%></time></td>
    <td></td>
    <td><a href="Menu-AddEdit.aspx?id=<%#Eval("Item_Id") %>&menu_typ=<%#Eval("Item_Typ") %>&cid=<%#Eval("Cid") %>&lang=<%=Item_Lang %>"><%=Lang.Show("Edit") %></a></td>
    <td><a href="javascript:Del(<%#Eval("Item_Id") %>,6)" class="del"><%=Lang.Show("Del") %></a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
